// TypeScript file
module Fighter {

    /**
     * 碰撞——郭启航
     */
    export class GameHit extends eui.Component {

        constructor() {
            super();

        }
        /**碰撞方法*/
        public static GameHit(obj1: egret.DisplayObject, obj2: egret.DisplayObject): boolean {
            var bool: boolean;
            var rect1: egret.Rectangle = obj1.getBounds();
            //rect1继承egret的矩形=obj。获取测量边界
            var rect2: egret.Rectangle = obj2.getBounds();
            rect1.x = obj1.x;
            rect1.y = obj1.y;
            rect2.x = obj2.x;
            rect2.y = obj2.y;
            bool = rect1.intersects(rect2);
            //检查rect1是否与rect2相交4
            return bool;
        }

    }
}